/**
 * 2010(c) www.jcaramel.com
 * TREEVIEW
 * 
 * Requires: 
 *  jCaramel-Core
 *  jCaramel-ListView
 */

 
 jQuery.fn.treeview = function(a, b, c){
	if (typeof(a) == 'string'){
		return jCaramel.listView[a](this, b);
	}else{
		settings = jQuery.extend({
			
			// Puts or removes checkboxes from items
			checkboxes: false,
			
			// One empty column by default
			columns : {'': 300},
			
			// Width and height of icons in list
			iconSize : 0,
			
			//Default mode
			mode: 'details',
			
			// Width of the items when in tile mode
			tileWidth : 230,
			
			// Columns to show on items when in tile mode
			tileItems : 3,
			
			//By defult hide column headers
			hideColumns: true,
			
			//By default make a tree... duh!
			tree: true,
			
		}, a);
		
		//Create the listview
		jCaramel.listView._create(this, settings);
		
		return this;
	} 
 };
